package com.jinsi.service.ylt.iml;

import com.jinsi.mapper.ylt.ZeroMonsyMapper;
import com.jinsi.pojo.SyCourseLog;
import com.jinsi.service.ylt.ZeroMonsyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * @ClassName ZeroMonsyServiceImpl
 * @Content 零消费用户service接口实现类
 * @Author 姚龙腾
 * @Date 2022/10/12 11:53
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class ZeroMonsyServiceImpl implements ZeroMonsyService {
    @Autowired
    private ZeroMonsyMapper zeroMonsyMapper;

    /**
     * 获取所有零消费用户信息展示于列表
     * @return List<SyCourseLog>
     */
    @Override
    @Transactional(readOnly = true)
    public List<SyCourseLog> getAll() {
        return zeroMonsyMapper.getAll();
    }


    /**
     * 根据输入信息进行模糊查询
     * @param userName
     * @param userAccount
     * @param userCreateDate
     * @return List<SyCourseLog>
     */
    @Override
    @Transactional(readOnly = true)
    public List<SyCourseLog> getAllByLike(
            String userName,
            String userAccount,
            String userCreateDate) {
        return zeroMonsyMapper.getAllByLike(
                userName,
                userAccount,
                userCreateDate);
    }
}
